package com.efast.dmom.mgmt.controller.les;

import com.efast.cafe.framework.bean.ResultBean;
import com.efast.dmom.mgmt.entity.les.TwOutbTaskHeader;
import com.efast.dmom.mgmt.service.les.TwOutbTaskHeaderService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * 拣货任务表 TW_OUTB_TASK_HEADER
 * @author chlp
 */
@Controller
@RequestMapping(value="/twOutbTaskHeader")
@Api(value = "/twOutbTaskHeader", description = "物流执行管理-->出库-->拣货管理")
public class TwOutbTaskHeaderController {
	
	@Autowired
	private TwOutbTaskHeaderService twOutbTaskHeaderService;
	
	/**
	 * 拣货管理UI：提供对拣货管理提供【查询】【确认拣货】【取消拣货】【行取消拣货】的功能；
	 * 确认捡货：更新header和detail状态。只能整单确认。
	 * @param  ConfirmPickingBean-- 备用
	 * @return
	 */
	@ApiOperation(value = "【确认拣货】", notes = "请求参数：")
	@RequestMapping(value = "/confirmPicking" , method=RequestMethod.POST)
	public @ResponseBody ResultBean confirmPicking(@RequestBody TwOutbTaskHeader twOutbTaskHeader){
		ResultBean result=new ResultBean(true,"'");
		twOutbTaskHeaderService.confirmPicking(twOutbTaskHeader);
		return result;
	}
	
	/**
	 * 拣货管理UI：提供对拣货管理提供【查询】【确认拣货】【取消拣货】【行取消拣货】的功能；
	 * 取消捡货：更新header和detail状态。只能整单取消。
	 * @param twDocAsnHeader
	 * @return
	 */
	@RequestMapping(value = "/cancelPicking")
	public @ResponseBody ResultBean cancelPicking(@RequestBody TwOutbTaskHeader twOutbTaskHeader){
		ResultBean result=new ResultBean(true,"'");
		twOutbTaskHeaderService.cancelPicking(twOutbTaskHeader);
		return result;
	}

}
